package com.zhouchb.blog.dao;

import com.zhouchb.blog.bean.Tag;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author Zhouchb
 * @Create 2021-09-2021/9/6 :20:26
 * @Description
 */
@Mapper
public interface TagRepositary {
    //添加
    public int saveTagesDao(Tag tag);

    //查询
    public Tag getTagByIdDao(Long id);

    public List<Tag> listTagDao();

    public Tag getTagByNameDao(String name);

    public List<Tag> listOrderCount(@Param("size") Integer size);
    //更新
    public int updateTagDao(@Param("id") Long id,@Param("tag") Tag tag);

    public int delTagDao(Long id);
    public List<Tag> listTagbyBlogId(Long blogId);

    public List<Tag> listTagAndCount();

    /*test*/
    public List<Tag> listTagTest(Integer size);


}
